package com.fare.taluo.application.crawl;

import java.util.Date;
import java.util.List;

import com.fare.taluo.vo.core.StatisticsTotalDetailEntityVO;
import com.fare.taluo.vo.core.StatisticsTotalEntityVO;
import com.fare.taluo.vo.core.TaskRecordEntityVO;

public interface TaskQueueLogApplication {
	
	public List<TaskRecordEntityVO> findAllTaskRecord(String fromCityOrg,String toCityOrg,String grabChannel,Date startTime,Date endTime,String status,String sortorder,String sortname,int page,int pagesize);

	public int getTotalTaskRecordListByCodition(String fromCityOrg,String toCityOrg,String grabChannel,Date startTime,Date endTime,String status);
	
	public List<TaskRecordEntityVO> findTaskRecordByCondition(String fromCityOrg,String toCityOrg,Date startTime,Date endTime,String status,String grabchannel);
	
	public List<TaskRecordEntityVO> findAll();
	
	public List getTaskRecordByNowDate(Date nowDate);

	public List<TaskRecordEntityVO> findAllTaskRecordBygTime(Date beginTime,Date endTime,String gabd,String status);
	
	//引擎统计
	List<TaskRecordEntityVO> getTaskRecordByDateAndChannel(Date grabdate,String grabchannelID,String status,int page,int pagesize);
	//total失败信息
	public List<TaskRecordEntityVO> getTotalRecordByDateAndChannel(Date grabdate,String grabchannelID,String status,String fromCity,String toCity,int page,int pagesize);
	//total and fail  
	public List<TaskRecordEntityVO> getTotalAndFailRecordByDateAndChannel(Date grabdate,String grabchannelID,String fromCity,String toCity,int page,int pagesize);
	 //ws
//	public List<TaskRecordEntityVO> getTotalAndFailRecordByByWS(TaskModel[] models);
	
	
	int getTotalAndFailCountByDateAndChannel(Date grabdate,String grabchannelID,String fromCity,String toCity);
	//引擎统计——总数
//	List<StatisticsTotalDetailEntityVO> getTotalAllByDateAndChannel(Date grabdate,String grabchannelID,String fromCity,String toCity,int page,int pagesize);
	public List<StatisticsTotalDetailEntityVO> getTotalAllByDateAndChannel(String grabdate,String grabchannelID,String fromCity,String toCity);
	//引擎统计——总数_实际总数 from WS
//	public List<StatisticsTotalDetailEntityVO> getTotalAllByWS(TaskModel[] models);
	
	int getTotalCountByFromAndTo(Date grabdate,String grabchannelID,String fromCity,String toCity);
	//total
	List<StatisticsTotalEntityVO> getTotalRecordByDateAndChannel(String grabdate,String grabchannelID) throws Exception;
	  //WS
//	public List<StatisticsTotalEntityVO> getTotalRecordByWS(TaskModel[] models);
//	getTotalCountByDateAndChannel
	int getTotalCountByDateAndChannel(Date grabdate,String grabchannelID,String status,String fromCity,String toCity);
	int getCountByDateAndChannel(Date grabdate,String grabchannelID,String status);
	//total
	int getCountByDateAndChannel_2(String grabdate,String grabchannelID);
	
	/**
	 * 处理数据持久化
	 * 1.取出需要持久化的数据
	 * 2.把数据存入库中
	*/	
	public List<TaskRecordEntityVO> getAllDatasByGrabDate(String grabDateStr,String endGrabDateStr);

	
}
